﻿
using System;
using UnityEngine;
using ZWFrameWork;
using Object = UnityEngine.Object;

/// <summary>
/// 玩家本地配置文件
/// </summary>
public class PlayerLocalConfig
{
    public static PlayerLocalConfig instance;

    public static PlayerLocalConfig getInstance()
    {
        if (instance == null)
        {
            instance = new PlayerLocalConfig();
        }

        return instance;
    }

    /// <summary>
    /// 存储数据
    /// </summary>
    /// <param name="key"></param>
    /// <param name="t"></param>
    /// <typeparam name="T"></typeparam>
    public void SaveConfig<T>(string key,T t) where T: Object
    {
        if (string.IsNullOrEmpty(key) || string.IsNullOrWhiteSpace(key))
        {
            ////GameUtilty.Error("key is null or empty");
            return;
        }

        string json = JsonUtility.ToJson(t);

    }



}
